package com.jack.lib.core.net

import androidx.lifecycle.Lifecycle

/**
 * author : chong.huang
 * create : 2021/12/23
 * desc   :
 */
interface JNetView {

    fun showLoading()

    fun hideLoading()

    fun lifecycle(): Lifecycle

    fun onFill(bean: JBaseData<*>)

    fun onError(cause: Throwable)

    fun isActive(): Boolean = lifecycle().currentState != Lifecycle.State.DESTROYED
}